package thread;

/**
 * Created by Xiang on 2014/8/17.
 */
public class ThreadTest2 extends Thread{
    private String name;

    public ThreadTest2(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 1000000; j++) {

            }
            System.out.println(name+i);
            System.out.println(Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {
        Thread t1 = new ThreadTest2("Lee");
        Thread t2 = new ThreadTest2("Jack");

        t1.start();
        t2.start();
    }
}
